home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 5
/
Aminet 5 - March 1995.iso
/
Aminet
/
util
/
conv
/
mcvert.lha
/
mcvert
/
mcvert.0
< prev
next >
Wrap
Text File
|
1994-12-17
|
8KB
|
265 lines
MCVERT(LOCAL) MISC. REFERENCE MANUAL PAGES MCVERT(LOCAL)
NAME
mcvert - BinHex 4.0 to MacBinary file conversion utility
SYNOPSIS
mcvert [-options] name... [[-options] name...]...
DESCRIPTION
The _m_c_v_e_r_t program translates MacIntosh files from one for-
mat to another. The primary formats in which MacIntosh
files are represented on non-Macs are:
MacBinary:
An eight bit wide representation of the data and
resource forks of a Mac file and of relevant Finder
information, MacBinary files are recognized as "spe-
cial" by several MacIntosh terminal emulators. These
emulators, using Kermit or Xmodem or any other file
transfer protocol, can separate the incoming file into
forks and appropriately modify the Desktop to display
icons, types, creation dates, and the like.
BinHex 4.0:
A seven bit wide representation of a Mac file with CRC
error checking, BinHex 4.0 files are designed for com-
munication of Mac files over long distance, possibly
noisy, seven bit wide paths.
PackIt:
PackIt files are actually representations of collec-
tions of Mac files, possibly Huffman compressed. Pack-
ing many small related files together before a Mac-
Binary transfer or a translation to BinHex 4.0 is com-
mon practice.
Text:
A MacIntosh ends each line of a plain text file with a
carriage return character (^M), rather than the newline
character (^J) that some systems seem to prefer. More-
over, a MacBinary file has prepended Finder information
that non-MacIntoshes don't need.
Data, Rsrc:
A Data or Rsrc file is the exact copy of the data or
resource fork of a MacIntosh file.
It is the purpose of this program to convert to the Mac-
Binary format files in other of the above formats, and vice
versa.
PARAMETERS
Exactly one of the following operations may be specified for
an input name:
Sun Release 4.1 Last change: May 5, 1987 1
MCVERT(LOCAL) MISC. REFERENCE MANUAL PAGES MCVERT(LOCAL)
x BinHex 4.0 - files in the MacBinary format are
translated to BinHex files, or vice versa. The name
argument may be the name of a file to be converted or a
basename to which an appropriate suffix must be
appended to get a filename. If the conversion is from
Binhex 4.0 to MacBinary, several files may comprise the
BinHex representation of the Mac file. Rather than
manually concatenate the files and manually delete mail
headers and other extraneous garbage, one may specify
the names of the files in order and _m_c_v_e_r_t will do the
concatenating and deleting. Conversely, in converting
a MacBinary file to BinHex 4.0 format for mailing over
long distances, one may be restricted to mail messages
of no greater that some fixed length. In this case,
_m_c_v_e_r_t can automatically divide the BinHex file into
pieces and label each piece appropriately. Option 'x'
is selected by default.
r Resource - files in the MacBinary format with empty
data forks and nonempty resource forks are made from
ordinary data files, or vice versa.
d Data - files in the MacBinary format with nonempty data
forks and empty resource forks are made from ordinary
data files, or vice versa.
u Text - files in the MacBinary format with nonempty data
forks and empty resource forks are made from ordinary
data files, or vice versa. Unix newline characters are
interchanged with MacIntosh carriage return characters,
and a newly created MacBinary file has creator field
given by the MAC_EDITOR environment variable.
OPTIONS
p | q
If a BinHex to MacBinary conversion is taking place and
option 'p' is selected, any file of type "PIT " will be
unpacked into its constituent parts. This option does
not recursively unpack "PIT " files packed in "PIT "
files. If a MacBinary to BinHex conversion is taking
place, this option is currently ignored. By default,
option 'q' is selected.
U | D
When option 'U' is selected, the conversion that takes
place is the one suitable for Uploading files. That
is, the conversion is from MacBinary to something else
when 'U' is selected. Conversely, option 'D', as in
Download, converts from something to MacBinary. Option
'D' is the default.
s | v
Sun Release 4.1 Last change: May 5, 1987 2
MCVERT(LOCAL) MISC. REFERENCE MANUAL PAGES MCVERT(LOCAL)
Normally, _m_c_v_e_r_t prints to stderr information about the
files it is creating. Selecting option 's', as in
silent, disables this reporting. Option 'v', for ver-
bose, is the default.
ENVIRONMENT VARIABLES
There are four environment variables one may use to custom-
ize the behavior of _m_c_v_e_r_t slightly.
MAC_EDITOR
The creator of MacBinary text files produced with
options -uD. The default is MACA, the creator type of
MacWrite.
MAC_DLOAD_DIR
The MacBinary files created when option -D is selected
are placed in this directory. The default is ".", the
current working directory.
MAC_EXT
The MacBinary files created when option -D is selected
are named according to the filename field stored in the
file header, with the name extended by this suffix.
The default is ".bin".
MAC_LINE_LIMIT
The BinHex files created when option -U is selected may
be no longer than this many lines long. Files that
would otherwise exceed this line limit are broken up
into several files with numbers embedded into their
file names to show their order. Each such file has
"Start of part x" and "End of part x" messages included
where appropriate.
BUGS
It should be possible to discard bad input now and success-
fully translate good input later, but bad input mostly just
causes immediate termination.
A more diligent person would support BinHex 3.0 and BinHex
2.0 and BinHex 5000.0 B. C., but I've never seen anyone use
them in three years. A more diligent person would also do
something for users of macget and macput, but hopefully
someone will make those programs support the MacBinary file
protocol.
SEE ALSO
xbin(1), macget(1), macput(1), xmodem(1), kermit(1)
AUTHOR
Doug Moore, Cornell University Computer Science. Based upon
_x_b_i_n by Dave Johnson, Brown University, as modified by Guido
Sun Release 4.1 Last change: May 5, 1987 3
MCVERT(LOCAL) MISC. REFERENCE MANUAL PAGES MCVERT(LOCAL)
van Rossum, and upon _u_n_p_i_t by Allan G. Weber, as well as
upon correspondence with several helpful readers of USENET.
Sun Release 4.1 Last change: May 5, 1987 4